<template>
  <div class="choose11">
    <lotteryHead ref="lotteryHead"></lotteryHead>
    <officialThe></officialThe>
    <theColorFooter ref="theColorFooter"></theColorFooter>
  </div>
</template>

<script>
  import lotteryHead from '../../../../components/lotteryColor/color/lotteryHead/index';
  import officialThe from '../transfer/officialList/index';
  import theColorFooter from '../transfer/theColorFooter/index';
  // 广东11选5
  import lotteryGD from './data/lotteryGD';
  // 台湾宾果
  import BingoTW from './data/BingoTW.json';
  // 江西11选5
  import lotteryJX11 from './data/lotteryJX11.json';
  // 山东11选5
  import lotterySD11 from './data/lotterySD11.json';
  // 江苏快三
  import lotteryJSK3 from './data/lotteryJSK3';
  // 上海快三
  import lotterySHK3 from './data/lotterySHK3';
  // 北京快乐8
  import happyBJ from './data/happyBJ';
  // 重庆时时彩
  import lotteryTime from './data/lotteryTime';
  // 北京pk10
  import lotteryBJPK10 from './data/lotteryBJPK10';
  // qq分分彩
  import lotteryQQ from './data/lotteryQQ';
  // 腾讯分分彩
  import lotteryTencentData from './data/lotteryTencent';
  export default {
    data() {
      return {
        localData: '',
      }
    },
    activated() {
      this.initData();
    },
    mounted() {

    },
    methods: {
      initData() {
        let that = this;
        let code = that.$route.query.code;
        switch (code) {
          case "002":
            that.localData = lotteryGD[0].data;
            break;
          case "026":
            that.localData = BingoTW[0].data;
            break;
          case "020":
            that.localData = lotteryJX11[0].data;
            break;
          case "022":
            that.localData = lotterySD11[0].data;
            break;
          case "010":
            that.localData = lotteryJSK3[0].data;
            break;
          case "024":
            that.localData = lotterySHK3[0].data;
            break;
          case "008":
            that.localData = happyBJ[0].data;
            break;
          case "004":
            that.localData = lotteryTime[0].data;
            break;
          case "006":
            that.localData = lotteryBJPK10[0].data;
            break;
          case "016":
            that.localData = lotteryQQ[0].data;
            break;
          case "018":
            that.localData = lotteryTencentData[0].data;
            break;
        }
        console.log('that.localData', that.localData)
      }
    },
    components: {
      lotteryHead,
      officialThe,
      theColorFooter
    },
    watch: {
      "$route.query.code"() {
        if(this.$route.name === 'credit' || this.$route.name === 'official') {
          this.initData();
        }
      }
    }
  }
</script>
